package io.github.wppli.domain.authenticate.service;

import io.github.wppli.domain.authenticate.model.entity.UserEntity;

import java.lang.reflect.InvocationTargetException;

/**
 * @author li--jiaqiang 2024−12−25
 */
public interface IAccountService {

    UserEntity queryUserInfoByEmail(String email) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException;

    UserEntity queryUserInfoByPhoneNumber(String phoneNumber) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException;

    void verifyAccountExist(String contactInformation) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException;

    void register(String contactInformation, String type);

    /**
     * 设置用户密码
     * @param contactInformation 邮箱或电话
     * @param password 密码
     */
    void setPassword(String contactInformation, String password);

    /**
     * 绑定邮箱
     */
    void bindEmailWithUsername(String email, String username);
}